<script type="text/javascript" src="${ctx}/scripts/html5.js"></script>
<link href="${ctx}/styles/global.css" rel="stylesheet" type="text/css">
<!--[if lt IE 9 ]><link href="${ctx}/styles/ie8Fix.css" rel="stylesheet" type="text/css"><![endif]-->
<!--[if lt IE 8 ]><link href="${ctx}/styles/ie7Fix.css" rel="stylesheet" type="text/css"><![endif]-->
<!--[if lt IE 7 ]><link href="${ctx}/styles/ie6Fix.css" rel="stylesheet" type="text/css"><![endif]-->
<!--[if lte IE 6]><style type='text/css'>.logo img,#topNav .btnField .btn{ behavior: url("scripts/iepngfix.htc") }</style><![endif]-->

</head>
<style>
 #topNav .btnField  .btn:hover{ text-decoration:none; background:#000; color:#f08200;}
 #topNav .btnField  .btn .btn1 .onMail:hover{ text-decoration:none; background:#000; color:#f08200;}
  #topNav .btnField  .btn1:hover{ text-decoration:none; background:#000; color:#f08200;}
 #topNav .btnField  .btn btn2:hover{ text-decoration:none; background:#000; color:#f08200;}
</style>
<#include '/macro.ftl'>
<body>
<nav id="topNav"><div class="bgA_01">
	<div class="logoField">
		<a href="${ctx}/21" class="logo" title="驾车宝典"><img src="${ctx}/images/logo_03.png" src="驾车宝典"></a>
	</div>
	<#if isLogin>
	<div class="btnField">
		<a href="#" class="btn user" title="个人信息"><span>${loginMember.nickName!}</span></a>
		<a href="#" class="btn btn1 onMail" title="我的私信">
				<span <#if isNew><#else> style='background: url(${ctx}/images/icon_mail_02.png) 50% 50% no-repeat;'</#if> > 我的私信 ></span>
		</a>
		<a href="#" class="btn btn2" title="用户设置"><span>用户设置</span></a>
	</div>
	<div class="menuField">
		<ul class="menu menu1">
			<li><a href="${ctx}/member/${loginMember.memberId?c}">我的主页</a></li>
			<li><a href="${ctx}/member/${loginMember.memberId?c}/topic-1-1">我的话题</a></li>
			<li><a href="${ctx}/member/${loginMember.memberId?c}/activity-1-1">我的活动</a></li>
			<li><a href="${ctx}/member/${loginMember.memberId?c}/group-1-1">我的群组</a></li>
			<!--<li><a href="#">我的粉丝</a></li> -->
		</ul>
		<ul class="menu menu2">
			<!-- <li><a href="#"><span class="count">0</span>通知</a></li> --> 
			<li><a href="${ctx}/message/receive"><span class="count">${unReadMessageCount!}</span>站内信</a></li>
			<li><a href="${ctx}/smgmemberfocus/listFans/${loginMember.memberId?c}-1"><span class="count">${newFansCount?c}</span>新粉丝</a></li>
		</ul>
		<ul class="menu menu3">
			<li><a href="${ctx}/member/memberInfo">个人资料</a></li>
			<li><a href="${ctx}/member/changePassword">安全设置</a></li>
			<li><a href="${ctx}/member/changeHead">头像上传</a></li>
			<li><a href="javascript:ajaxLogOut();">退出</a></li>
		</ul>
	</div>
	<#else>
	<div class="btnField">
		<a href="${ctx}/member/login" class="btn" title="登录"><span>登录</span></a><a href="${ctx}/member/reg" class="btn" title="注册"><span>注册</span></a>
	</div>
	</#if>
	<div class="navField">
		<a  target="_blank" href="http://www.365take.com" title="驾车宝典">驾车宝典</a> |
		<a target="_blank"  href="http://www.365take.com/car/product/list/" title="汽车服务">汽车服务</a> |
		<a target="_blank"  href="http://www.365take.com/car/merchant/list/" title="权益商户">权益商户</a> | 
		<a target="_blank"  href="http://www.365take.com/car/login/?goto=/car/account/entry/" title="会员服务">会员服务</a> |
		<a target="_blank"  href="http://radio.smgbb.cn/radio/live/2009-07-07/645.shtml" title="在线电台">在线电台</a>
		
		 
		
		
	</div>
</div></nav>
<!--顶部导航结束-->

<!--头部开始
<header id="header"><div class="bgA_01">
	<div class="btns">
		<span class="btn download" ></span>
	</div>
	<div class="bannerField">
		<a href="http://www.tac1057.com/topic/detail/4056"><img src="${ctx}/images/pic_banner_01.jpg" alt=""></a>
	</div>
</div></header>
-->
<header id="header">
 <div class="bgA_01">
	<div class="btns">
		<a target="_blank" href=""><img width="260" height="90" src="http://www.tac1057.com/images/btn_download_01.jpg" alt=""></a>
	</div>
	<div class="bannerField">
		<a href="http://www.tac1057.com/topic/detail/13032"><img width="680" height="90" alt="" src="/images/pic_banner_01.jpg"></a>
	</div>
</div>
</header>
<!--头部结束-->

<!--导航开始-->
<nav id="mainNav"><div class="bgA_01">
	<!--
	<div class="searchField">
		<input type="text" class="txt" placeholder='用户/帖子/活动'>
		<input type="button" class="btn" value="" title="搜索">
	</div>
	-->
	<div class="navField">
		<#if tabIndex?exists><#else><#assign tabIndex = 1></#if>
		<#if cityNo?exists><#else><#assign cityNo = 21></#if>
		<ul>
			<li class="link1"><a href="${ctx}/${cityNo}" title="社区首页" <#if tabIndex == 1 >class="on" </#if>  >社区首页</a></li>
			<li class="link3"><a href="${ctx}/forum/${cityNo}" title="话题" <#if tabIndex == 3 >class="on" </#if> >话题</a></li>
			<li class="link4"><a href="${ctx}/activity/${cityNo}" title="活动"  <#if tabIndex == 4 >class="on" </#if> >活动</a></li>
			<li class="link5"><a href="${ctx}/behavior" title="新鲜事" <#if tabIndex == 5 >class="on" </#if> >新鲜事</a></li>
			<li class="link2"><a href="${ctx}/group/21" title="群组" <#if tabIndex == 2 >class="on" </#if> >群组</a></li>
			<#if isLogin && tabIndex==6><li class="link6"><a href="${ctx}/member" title="用户主页" <#if tabIndex == 6 >class="on" </#if>>用户主页</a></li>
			</#if>
			
		</ul>
	</div>
</div></nav>

<!--
<!--顶部导航开始-->
<!--
<nav id="topNav"><div class="bgA_01">
	<#if isLogin>
	<div class="linkField">
		<div class="links">
			<a href="${ctx}/member/memberInfo" title="个人设置">个人设置</a>
			<a  href='javascript:ajaxLogOut();' title="退出">退出</a>
		</div>
		<div class="user">
			<a href="<@userCenterLink memberId="${loginMember.memberId?c}" />" title="个人信息">${loginMember.nickName!}</a>
		</div>
	</div>
	<#else>
		<div class="linkField">
		<div class="links">
			<a href="${ctx}/member/reg"  title="我的私信">注册</a>
			<a  href='${ctx}/member/login' title="退出">登录</a>
		</div>
	</div>
	</#if>
	<div class="navField">
		<a href="#" title="社区广场">社区广场</a> | <a href="#" title="网站导航">网站导航</a> | <a href="http://www.365take.com" title="驾车宝典">驾车宝典</a> | <a href="http://e.weibo.com/210571314" title="购物车">官方微博</a>
	</div>
</div></nav>
-->
<!--顶部导航结束-->


<!--导航开始-->
<!--
<nav id="mainNav"><div class="bgA_01">
	<div class="searchField">
		<input type="text" class="txt" value="驾车宝典">
		<input type="button" class="btn" value="" title="搜索">
	</div>
	<div class="navField">
		<#if tabIndex?exists><#else><#assign tabIndex = 1></#if>
		<#if cityNo?exists><#else><#assign cityNo = 21></#if>
		<ul>
			<li class="link1"><a href="${ctx}/${cityNo}" title="社区首页" <#if tabIndex == 1 >class="on" </#if>  >社区首页</a></li>
			<li class="link2"><a href="${ctx}/group/detail/26" title="群组" <#if tabIndex == 2 >class="on" </#if> >车友会</a></li>
			<li class="link3"><a href="${ctx}/forum/${cityNo}" title="话题" <#if tabIndex == 3 >class="on" </#if> >话题</a></li>
			<li class="link4"><a href="${ctx}/activity/${cityNo}" title="活动"  <#if tabIndex == 4 >class="on" </#if> >活动</a></li>
			<li class="link5"><a href="${ctx}/behavior" title="新鲜事" <#if tabIndex == 5 >class="on" </#if> >新鲜事</a></li>
			<#if isLogin && tabIndex==6><li class="link6"><a href="${ctx}/member" title="用户主页" <#if tabIndex == 6 >class="on" </#if>>用户主页</a></li>
			</#if>
			
		</ul>
	</div>
</div></nav>
-->
<!--导航结束-->
<script>
	function ajaxLogOut(){
		$.ajax({
		 			type: "get",
					url: "${ctx}/member/logout",
					beforeSend: function(XMLHttpRequest){
					//ShowLoading();
					},
					success: function(data, textStatus){
						window.location.href = "${ctx}/21";
					},
					data:{
					},
					dataType:'json'
				}
	 		)
	}
	function loginInIndex(){
			var password = $('#password').val();
			var loginName = $('#loginName').val();
			if ( loginName  == "" ){
				alert("请输入登录名!");
				return ;
			}
	 
			if ( password  == "" ){
				alert("请输入密码!");
				return ;
			}
	 		$.ajax({
		 			type: "get",
					url: "${ctx}/member/ajaxlogin",
					beforeSend: function(XMLHttpRequest){
					//ShowLoading();
					},
					success: function(data, textStatus){
						var state = data.state;
						if ( state == 1 ){
							alert("登录成功");
							window.location.reload();
						}else{
							desc = data.desc;
							alert(desc);
						}
					},
					data:{
						"password":password,
						"loginName":loginName
					},
					dataType:'json'
				}
	 		)
	 }

</script>